package com.yzh.wanandroid.utils

fun checkDoubleClick(block :() -> Unit) {
    val MIN_CLICK_TIME = 1000
    var lastClickTime: Long = 0
    val currentTime = System.currentTimeMillis()
    if (currentTime - lastClickTime > MIN_CLICK_TIME) {
        block.invoke()
    }
}